package dayOOP0714;

public class Test6 {
    public static void main(String[] args) {
        Student2  zhangSan=new Student2(5000);
        Student2  s=new Test6().test(zhangSan);
        System.out.println(  zhangSan.money  );
    }

    private Student2 test(Student2 xz) {
        xz=new Student2(6000);
        return  xz;
    }
}//通过zhangSan和xiaoZhang两个名称修改同一个人的财产


class  Student2{
    double money;
    public Student2(double n) {this.money=n; }
}















